/**
 *
 */
package com.wedroid.r2d2.config;

import org.springframework.beans.factory.config.PropertiesFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.io.ClassPathResource;

/**
 * @author lute
 */
@Configuration
@Profile("production")
public class BeansProductionConfig {

    /**
     * @return
     */
    @Bean
    public PropertiesFactoryBean config() {
        PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
        propertiesFactoryBean.setLocation(new ClassPathResource("config/prod/config.pod.properties"));
        return propertiesFactoryBean;
    }

    /**
     * @return
     */
    @Bean
    public PropertiesFactoryBean jdbc() {
        PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
        propertiesFactoryBean.setLocation(new ClassPathResource("config/prod/jdbc.prod.properties"));
        return propertiesFactoryBean;
    }

}
